<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	xmlns:p="http://primefaces.org/ui">
	
<h:head>
	<h:outputStylesheet library="css" name="main.css" />
</h:head>

<h:body>
<ui:composition template="/template/default.xhtml">
	<ui:define name="no_form">
		<h:outputScript name="locales.js" library="js"/> 
		<h:form>
		
			<h2>#{msgs.atualizarDados}</h2>
			
				<h:panelGrid columns="2">
				
				<h:outputLabel for="nome" value="#{msgs.nome}" />
				<h:inputText id="nome" value="#{userMB.user.nome}" required="true" 
					requiredMessage="#{msgs.preenchaTodosOsCampos}"
					validatorMessage="#{msgs.tamanhoMaximo}" maxlength="50" size="50">
				</h:inputText>
				
				<h:outputLabel for="cpf" value="#{msgs.cpf2}" />
				<h:inputText id="cpf" value="#{userMB.user.cpf}" required="true" 
					requiredMessage="#{msgs.preenchaTodosOsCampos}"
					validatorMessage="#{msgs.tamanhoMaximo}" maxlength="15" size="15">
				</h:inputText>
				
				<h:outputLabel for="cns" value="#{msgs.cns}" />
				<h:inputText id="cns" value="#{userMB.user.cns}" required="false" 
					requiredMessage="#{msgs.preenchaTodosOsCampos}"
					validatorMessage="#{msgs.tamanhoMaximo}" maxlength="20" size="20">
				</h:inputText>
				
				</h:panelGrid>
			
			<h:panelGrid columns="2">
			
			<h:commandButton 
				action="pacientes" 
				value="#{msgs.voltarPaginaInicial}" 
				immediate="true" 
			/>
			
			<h:commandButton action="#{userMB.atualizar()}" value="#{msgs.atualizar}" />
			
			</h:panelGrid>
			
		</h:form>
	</ui:define>
</ui:composition>
	
</h:body>
</html>